package com.meelive.ingkee.push.platform.jpush;

import android.content.Context;
import android.util.Log;

import com.meelive.ingkee.push.InkePushConfig;
import com.meelive.ingkee.push.common.PushUtils;
import com.meelive.ingkee.push.model.InkePushType;
import com.meelive.ingkee.push.platform.IPush;

import cn.jiguang.api.JCoreInterface;
import cn.jpush.android.api.JPushInterface;

import static com.meelive.ingkee.push.model.Constance.TAG;

/**
 * Create by: fanfeiyue
 * on: 2019-08-22
 * desc:
 * 文档: https://docs.jiguang.cn//jpush/client/Android/android_guide/#jcenter
 */
public class InkeJPush extends IPush {
    @Override
    public InkePushType getPushType() {
        return InkePushType.JPUSH;
    }

    @Override
    public void onRegister(Context context, InkePushConfig config) {
        if (PushUtils.DEBUG) {
            Log.d(TAG, "InkeJPush onRegister");
        }
        JPushInterface.setDebugMode(PushUtils.DEBUG);
        JCoreInterface.setWakeEnable(context, false);
        JPushInterface.init(context);
    }

    @Override
    public void onUnregister(Context context, InkePushConfig config) {
    }

}
